import React from 'react'
import { Link } from "react-router-dom";
import PageTitle from '../../components/page-title'
import { Button, Divider, Select, Input, Checkbox } from 'antd'
const { Option } = Select;
class NewRun extends React.Component {
    constructor(props) {
        super(props)
        this.state = {

        }
    }
    handleChange(value) {
        console.log(`selected ${value}`);
    }
    commit() {
        alert('验证提交参数 并且跳转路由页面到----RunC')
    }

    render() {
        return (
            <div id="page-wrapper">
                <div style={{ justifyContent: "center", display: "flex", marginTop: 20, }}>
                    <PageTitle title="新建任务" /></div>
                <Divider />

                <div style={{ marginLeft: 30 }}>
                    <div>
                        <span>环境号</span><span>100</span>
                    </div>

                    <div style={{ justifyContent: 'center', display: "flex", alignItems: "center", marginTop: 30 }}>
                        <div>选取执行集</div>
                        <Select defaultValue="选择执行集名称" style={{ width: 200, marginLeft: 20 }} onChange={(e) => this.handleChange(e)}>
                            <Option value="执行集1" >执行集1</Option>
                            <Option value="执行集2" >执行集2 </Option>
                            <Option value="执行集3" >执行集3 </Option>
                        </Select>

                        <div style={{ marginLeft: 40 }}>关联环境</div>
                        <Select defaultValue="选取关联环境" style={{ width: 120, marginLeft: 10 }} onChange={(e) => this.handleChange(e)}>
                            <Option value="环境1" >环境1</Option>
                            <Option value="环境2" >环境2</Option>
                            <Option value="环境3" >环境3</Option>
                        </Select>
                    </div>

                    <div style={{ display: "flex", marginTop: 40,justifyContent:"center" }}>
                        <Button
                            type="primary"
                            size="large"
                            onClick={() => {
                                this.commit()
                            }}
                            style={{ marginRight: 45 }}>
                            生成
                        </Button>
                        <Button type="primary" size="large">
                            <Link to='/RunC'>取消</Link>
                        </Button>
                    </div>
                </div>

            </div>

        )

    }

}
export default NewRun